package com.ph.shopping.facade.product.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Table;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.ph.shopping.common.core.base.BaseEntity;

@Table(name="ph_product_image")
public class PhProductImage  extends BaseEntity  implements Serializable{
	
    /**
	 * 
	 */
	private static final long serialVersionUID = 6896809721850362138L;


    /** 图片路径 */
	@Column(name="url")
	@NotBlank(message="[图片路径]不可为空")
   	@Length(max=255,message="[图片路径]最大长度为255个字符")
    private String url;

    /** 商品id */
	@Column(name="productId")
    private Long productId;

    /** 排序 */
	@Column(name="sort")
    private Integer sort;

    /** 图片类型 */
	@Column(name="type")
    private String type;



    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url == null ? null : url.trim();
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type == null ? null : type.trim();
    }

}